{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "hw15_reinforcement_learning.ipynb",
      "provenance": [],
      "collapsed_sections": [],
      "toc_visible": true,
      "include_colab_link": true
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/Iallen520/lhy_DL_Hw/blob/master/hw15_reinforcement_learning.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Fp30SB4bxeQb",
        "colab_type": "text"
      },
      "source": [
        "# **Homework 15 - Reinforcement Learning**\n",
        "\n",
        "若有任何問題，歡迎來信至助教信箱 ntu-ml-2020spring-ta@googlegroups.com\n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "yXsnCWPtWSNk",
        "colab_type": "text"
      },
      "source": [
        "## 前置作業\n",
        "\n",
        "首先我們需要安裝必要的系統套件及 PyPi 套件。\n",
        "gym 這個套件由 OpenAI 所提供，是一套用來開發與比較 Reinforcement Learning 演算法的工具包（toolkit）。\n",
        "而其餘套件則是為了在 Notebook 中繪圖所需要的套件。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "5e2bScpnkVbv",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "%%capture\n",
        "!apt update\n",
        "!apt install python-opengl xvfb -y\n",
        "!pip install gym[box2d] pyvirtualdisplay piglet"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "M_-i3cdoYsks",
        "colab_type": "text"
      },
      "source": [
        "接下來，設置好 virtual display，並引入所有必要的套件。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "nl2nREINDLiw",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "%%capture\n",
        "from pyvirtualdisplay import Display\n",
        "virtual_display = Display(visible=0, size=(1400, 900))\n",
        "virtual_display.start()\n",
        "\n",
        "%matplotlib inline\n",
        "import matplotlib.pyplot as plt\n",
        "\n",
        "from IPython import display\n",
        "\n",
        "import numpy as np\n",
        "import torch\n",
        "import torch.nn as nn\n",
        "import torch.optim as optim\n",
        "import torch.nn.functional as F\n",
        "from torch.distributions import Categorical"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "He0XDx6bzjgC",
        "colab_type": "text"
      },
      "source": [
        "最後，引入 OpenAI 的 gym，並建立一個 [Lunar Lander](https://gym.openai.com/envs/LunarLander-v2/) 環境。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "N_4-xJcbBt09",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "%%capture\n",
        "import gym\n",
        "env = gym.make('LunarLander-v2')"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "NrkVvTrvWZ5H",
        "colab_type": "text"
      },
      "source": [
        "## 什麼是 Lunar Lander？\n",
        "\n",
        "“LunarLander-v2” 這個環境是在模擬登月小艇降落在月球表面時的情形。\n",
        "這個任務的目標是讓登月小艇「安全地」降落在兩個黃色旗幟間的平地上。\n",
        "> Landing pad is always at coordinates (0,0).\n",
        "> Coordinates are the first two numbers in state vector.\n",
        "\n",
        "![](https://gym.openai.com/assets/docs/aeloop-138c89d44114492fd02822303e6b4b07213010bb14ca5856d2d49d6b62d88e53.svg)\n",
        "\n",
        "所謂的「環境」其實同時包括了 agent 和 environment。\n",
        "我們利用 `step()` 這個函式讓 agent 行動，而後函式便會回傳 environment 給予的 observation/state（以下這兩個名詞代表同樣的意思）和 reward。"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "bIbp82sljvAt",
        "colab_type": "text"
      },
      "source": [
        "### Observation / State\n",
        "\n",
        "首先，我們可以看看 environment 回傳給 agent 的 observation 究竟是長什麼樣子的資料："
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "rsXZra3N9R5T",
        "colab_type": "code",
        "outputId": "f0604c7f-48d6-49cb-8921-6407b3f6c4f9",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "print(env.observation_space)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Box(8,)\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ezdfoThbAQ49",
        "colab_type": "text"
      },
      "source": [
        "`Box(8,)` 說明我們會拿到 8 維的向量作為 observation，其中包含：垂直及水平座標、速度、角度、加速度等等，這部分我們就不細說。\n",
        "\n",
        "### Action\n",
        "\n",
        "而在 agent 得到 observation 和 reward 以後，能夠採取的動作有："
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "p1k4dIrBAaKi",
        "colab_type": "code",
        "outputId": "11c1a4d8-6455-451f-9999-16a5eec8fa63",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "print(env.action_space)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Discrete(4)\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "dejXT6PHBrPn",
        "colab_type": "text"
      },
      "source": [
        "`Discrete(4)` 說明 agent 可以採取四種離散的行動：\n",
        "- 0 代表不採取任何行動\n",
        "- 2 代表主引擎向下噴射\n",
        "- 1, 3 則是向左右噴射\n",
        "\n",
        "接下來，我們嘗試讓 agent 與 environment 互動。\n",
        "在進行任何操作前，建議先呼叫 `reset()` 函式讓整個「環境」重置。\n",
        "而這個函式同時會回傳「環境」最初始的狀態。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "pi4OmrmZgnWA",
        "colab_type": "code",
        "outputId": "b1fbd5cf-dfcd-40a1-f5e8-4ea078aec347",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 51
        }
      },
      "source": [
        "initial_state = env.reset()\n",
        "print(initial_state)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "[ 4.1179656e-04  1.4151570e+00  4.1696824e-02  1.8830016e-01\n",
            " -4.7039185e-04 -9.4449501e-03  0.0000000e+00  0.0000000e+00]\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "uBx0mEqqgxJ9",
        "colab_type": "text"
      },
      "source": [
        "接著，我們試著從 agent 的四種行動空間中，隨機採取一個行動"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "vxkOEXRKgizt",
        "colab_type": "code",
        "outputId": "e4921d68-698f-46fe-f608-27fd18c4c78c",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "random_action = env.action_space.sample()\n",
        "print(random_action)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "1\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "mns-bO01g0-J",
        "colab_type": "text"
      },
      "source": [
        "再利用 `step()` 函式讓 agent 根據我們隨機抽樣出來的 `random_action` 動作。\n",
        "而這個函式會回傳四項資訊：\n",
        "- observation / state\n",
        "- reward\n",
        "- 完成與否\n",
        "- 其餘資訊"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "E_WViSxGgIk9",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "observation, reward, done, info = env.step(random_action)"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "FdieGq7NuBIm",
        "colab_type": "text"
      },
      "source": [
        "第一項資訊 `observation` 即為 agent 採取行動之後，agent 對於環境的 observation 或者說環境的 state 為何。\n",
        "而第三項資訊 `done` 則是 `True` 或 `False` 的布林值，當登月小艇成功著陸或是不幸墜毀時，代表這個回合（episode）也就跟著結束了，此時 `step()` 函式便會回傳 `done = True`，而在那之前，`done` 則保持 `False`。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "yK7r126kuCNp",
        "colab_type": "code",
        "outputId": "3b232447-c2a2-498e-a0ae-fe16c3396a05",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "print(done)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "False\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "GKdS8vOihxhc",
        "colab_type": "text"
      },
      "source": [
        "### Reward\n",
        "\n",
        "而「環境」給予的 reward 大致是這樣計算：\n",
        "- 小艇墜毀得到 -100 分\n",
        "- 小艇在黃旗幟之間成功著地則得 100~140 分\n",
        "- 噴射主引擎（向下噴火）每次 -0.3 分\n",
        "- 小艇最終完全靜止則再得 100 分\n",
        "\n",
        "> Reward for moving from the top of the screen to landing pad and zero speed is about 100..140 points.\n",
        "> If lander moves away from landing pad it loses reward back.\n",
        "> Episode finishes if the lander crashes or comes to rest, receiving additional -100 or +100 points.\n",
        "> Each leg ground contact is +10.\n",
        "> Firing main engine is -0.3 points each frame.\n",
        "> Solved is 200 points."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "vxQNs77hi0_7",
        "colab_type": "code",
        "outputId": "44c84a9f-499a-4e3d-d1d8-e565791a5f89",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "print(reward)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "2.30736201823902\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Mhqp6D-XgHpe",
        "colab_type": "text"
      },
      "source": [
        "### Random Agent\n",
        "\n",
        "最後，在進入實做之前，我們就來看看這樣一個 random agent 能否成功登陸月球："
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Y3G0bxoccelv",
        "colab_type": "code",
        "outputId": "67f637a7-9c90-404c-d53c-6c1d54ba30a2",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "env.reset()\n",
        "\n",
        "img = plt.imshow(env.render(mode='rgb_array'))\n",
        "\n",
        "done = False\n",
        "while not done:\n",
        "    action = env.action_space.sample()\n",
        "    observation, reward, done, _ = env.step(action)\n",
        "\n",
        "    img.set_data(env.render(mode='rgb_array'))\n",
        "    display.display(plt.gcf())\n",
        "    display.clear_output(wait=True)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAATWElEQVR4nO3df6zldZ3f8edrAdGuZgFlyTAzFq2z\na8imO8gtYtY0SCOLZLawibWSZiWWdGwCiSamLWyTimn3j01WaY0bsrOBChsXlvqjTCZtFJHG9g/B\niyLyQ9ZxxTDDyLjLDyWmbMF3/zifyx5n7p177rn33HM/5zwfycn5fj/f7/d8P5/hzGs+vM/3e06q\nCklSP35p2h2QJK2NwS1JnTG4JakzBrckdcbglqTOGNyS1JmJBXeSS5M8nuRgkusmdR5JmjeZxHXc\nSU4C/hJ4N3AI+AZwZVU9uuEnk6Q5M6kZ9wXAwar6q6r6W+AO4PIJnUuS5srJE3rd7cCTQ+uHgLev\ntHMSb9+UpGNUVZZrn1RwryrJXmDvtM4vSb2aVHAfBnYOre9oba+oqn3APnDGLUlrMaka9zeAXUne\nlORVwPuB/RM6lyTNlYnMuKvqpSTXAl8CTgJuqapHJnEu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6rIwL4F1VtXvo0r/e34vjq6qpPYB3AF8aWr8euH6a\nfRpzHOcADw+tPw5sa8vbGFynDvAnwJXL7bfVH8BdwLtnaWzA3wO+CbydwQ0cJ7f2V96XwJeAd7Tl\nk9t+mXbfVxjPDgYBdjFwAMgsjKv18QngDce0zcx7ca2PaZdKtgNPDq0fam29O6uqjrTlHwFnteUu\nx9v+N/o84D5mYGytnPAgcBS4G/g+8FxVvdR2Ge77K+Nq258HXr+5PR7Zfwb+LfDztv56ZmNcAAV8\nOckDSfa2tu7fi+PaKndOzqyqqiTdXrqT5LXA54GPVNVPkryyrdexVdXLwO4kpwFfBN465S6tW5I9\nwNGqeiDJRdPuzwS8s6oOJ/lV4O4k3x3e2Ot7cVzTnnEfBnYOre9obb17Osk2gPZ8tLV3Nd4kpzAI\n7c9W1Rda80yMDaCqngPuZVBCOC3J0kRmuO+vjKtt/xXgbza5q6P4LeCfJnkCuINBueS/0P+4AKiq\nw+35KIN/bC9ght6LazXt4P4GsKt98v0q4P3A/in3aSPsB65qy1cxqA8vtX+gfep9IfD80P/qbSkZ\nTK1vBh6rqk8Obep6bEnObDNtkryGQd3+MQYB/t6227HjWhrve4GvViucbiVVdX1V7aiqcxj8Pfpq\nVf0LOh8XQJJfTvK6pWXgEuBhOn8vrsu0i+zAZcBfMqgz/vtp92eM/t8OHAH+H4Na2tUMaoX3AN8D\nvgKc0fYNg6tovg98B1iYdv9PMK53MqgrPgQ82B6X9T424B8C32rjehj4D639zcD9wEHgvwGntvZX\nt/WDbfubpz2GEcZ4EXBgVsbVxvDt9nhkKSd6fy+u5+Gdk5LUmWmXSiRJa2RwS1JnDG5J6ozBLUmd\nMbglqTMGtyR1xuCWpM4Y3JLUmf8PeYFBhumKn2kAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "F5paWqo7tWL2",
        "colab_type": "text"
      },
      "source": [
        "## Policy Gradient\n",
        "\n",
        "現在來搭建一個簡單的 policy network。\n",
        "我們預設模型的輸入是 8-dim 的 observation，輸出則是離散的四個動作之一："
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "J8tdmeD-tZew",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "class PolicyGradientNetwork(nn.Module):\n",
        "\n",
        "    def __init__(self):\n",
        "        super().__init__()\n",
        "        self.fc1 = nn.Linear(8, 16)\n",
        "        self.fc2 = nn.Linear(16, 16)\n",
        "        self.fc3 = nn.Linear(16, 4)\n",
        "\n",
        "    def forward(self, state):\n",
        "        hid = torch.tanh(self.fc1(state))\n",
        "        hid = torch.tanh(self.fc2(hid))\n",
        "        return F.softmax(self.fc3(hid), dim=-1)"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ynbqJrhIFTC3",
        "colab_type": "text"
      },
      "source": [
        "再來，搭建一個簡單的 agent，並搭配上方的 policy network 來採取行動。\n",
        "這個 agent 能做到以下幾件事：\n",
        "- `learn()`：從記下來的 log probabilities 及 rewards 來更新 policy network。\n",
        "- `sample()`：從 environment 得到 observation 之後，利用 policy network 得出應該採取的行動。\n",
        "而此函式除了回傳抽樣出來的 action，也會回傳此次抽樣的 log probabilities。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "zZo-IxJx286z",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "class PolicyGradientAgent():\n",
        "\n",
        "    def __init__(self, network):\n",
        "        self.network = network\n",
        "        self.optimizer = optim.SGD(self.network.parameters(), lr=0.001)\n",
        "\n",
        "    def learn(self, log_probs, rewards):\n",
        "        loss = (-log_probs * rewards).sum()\n",
        "\n",
        "        self.optimizer.zero_grad()\n",
        "        loss.backward()\n",
        "        self.optimizer.step()\n",
        "\n",
        "    def sample(self, state):\n",
        "        action_prob = self.network(torch.FloatTensor(state))\n",
        "        action_dist = Categorical(action_prob)\n",
        "        action = action_dist.sample()\n",
        "        log_prob = action_dist.log_prob(action)\n",
        "        return action.item(), log_prob"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ehPlnTKyRZf9",
        "colab_type": "text"
      },
      "source": [
        "最後，建立一個 network 和 agent，就可以開始進行訓練了。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "GfJIvML-RYjL",
        "colab_type": "code",
        "colab": {}
      },
      "source": [
        "network = PolicyGradientNetwork()\n",
        "agent = PolicyGradientAgent(network)"
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ouv23glgf5Qt",
        "colab_type": "text"
      },
      "source": [
        "## 訓練 Agent\n",
        "\n",
        "現在我們開始訓練 agent。\n",
        "透過讓 agent 和 environment 互動，我們記住每一組對應的 log probabilities 及 reward，並在成功登陸或者不幸墜毀後，回放這些「記憶」來訓練 policy network。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "vg5rxBBaf38_",
        "colab_type": "code",
        "outputId": "a2ac2226-a803-41c2-dcc2-9b338ad591d0",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        }
      },
      "source": [
        "agent.network.train()  # 訓練前，先確保 network 處在 training 模式\n",
        "EPISODE_PER_BATCH = 5  # 每蒐集 5 個 episodes 更新一次 agent\n",
        "NUM_BATCH = 400        # 總共更新 400 次\n",
        "\n",
        "avg_total_rewards, avg_final_rewards = [], []\n",
        "\n",
        "for batch in range(NUM_BATCH):\n",
        "\n",
        "    log_probs, rewards = [], []\n",
        "    total_rewards, final_rewards = [], []\n",
        "\n",
        "    # 蒐集訓練資料\n",
        "    for episode in range(EPISODE_PER_BATCH):\n",
        "        \n",
        "        state = env.reset()\n",
        "        total_reward, total_step = 0, 0\n",
        "\n",
        "        while True:\n",
        "\n",
        "            action, log_prob = agent.sample(state)\n",
        "            next_state, reward, done, _ = env.step(action)\n",
        "\n",
        "            log_probs.append(log_prob)\n",
        "            state = next_state\n",
        "            total_reward += reward\n",
        "            total_step += 1\n",
        "\n",
        "            if done:\n",
        "                final_rewards.append(reward)\n",
        "                total_rewards.append(total_reward)\n",
        "                rewards.append(np.full(total_step, total_reward))  # 設定同一個 episode 每個 action 的 reward 都是 total reward\n",
        "                break\n",
        "\n",
        "    # 紀錄訓練過程\n",
        "    avg_total_reward = sum(total_rewards) / len(total_rewards)\n",
        "    avg_final_reward = sum(final_rewards) / len(final_rewards)\n",
        "    avg_total_rewards.append(avg_total_reward)\n",
        "    avg_final_rewards.append(avg_final_reward)\n",
        "    print(\"Batch {},\\tTotal Reward = {:.1f},\\tFinal Reward = {:.1f}\".format(batch+1, avg_total_reward, avg_final_reward))\n",
        "\n",
        "    # 更新網路\n",
        "    rewards = np.concatenate(rewards, axis=0)\n",
        "    rewards = (rewards - np.mean(rewards)) / (np.std(rewards) + 1e-9)  # 將 reward 正規標準化\n",
        "    agent.learn(torch.stack(log_probs), torch.from_numpy(rewards))"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Batch 1,\tTotal Reward = -198.1,\tFinal Reward = -100.0\n",
            "Batch 2,\tTotal Reward = -192.3,\tFinal Reward = -100.0\n",
            "Batch 3,\tTotal Reward = -166.5,\tFinal Reward = -100.0\n",
            "Batch 4,\tTotal Reward = -174.3,\tFinal Reward = -100.0\n",
            "Batch 5,\tTotal Reward = -230.8,\tFinal Reward = -100.0\n",
            "Batch 6,\tTotal Reward = -116.0,\tFinal Reward = -100.0\n",
            "Batch 7,\tTotal Reward = -98.2,\tFinal Reward = -100.0\n",
            "Batch 8,\tTotal Reward = -299.3,\tFinal Reward = -100.0\n",
            "Batch 9,\tTotal Reward = -267.0,\tFinal Reward = -100.0\n",
            "Batch 10,\tTotal Reward = -218.8,\tFinal Reward = -80.5\n",
            "Batch 11,\tTotal Reward = -147.4,\tFinal Reward = -100.0\n",
            "Batch 12,\tTotal Reward = -201.6,\tFinal Reward = -100.0\n",
            "Batch 13,\tTotal Reward = -217.0,\tFinal Reward = -100.0\n",
            "Batch 14,\tTotal Reward = -207.3,\tFinal Reward = -100.0\n",
            "Batch 15,\tTotal Reward = -124.5,\tFinal Reward = -100.0\n",
            "Batch 16,\tTotal Reward = -179.6,\tFinal Reward = -100.0\n",
            "Batch 17,\tTotal Reward = -294.4,\tFinal Reward = -100.0\n",
            "Batch 18,\tTotal Reward = -154.1,\tFinal Reward = -100.0\n",
            "Batch 19,\tTotal Reward = -267.8,\tFinal Reward = -100.0\n",
            "Batch 20,\tTotal Reward = -179.1,\tFinal Reward = -100.0\n",
            "Batch 21,\tTotal Reward = -150.6,\tFinal Reward = -100.0\n",
            "Batch 22,\tTotal Reward = -135.9,\tFinal Reward = -100.0\n",
            "Batch 23,\tTotal Reward = -366.1,\tFinal Reward = -100.0\n",
            "Batch 24,\tTotal Reward = -190.9,\tFinal Reward = -100.0\n",
            "Batch 25,\tTotal Reward = -176.3,\tFinal Reward = -100.0\n",
            "Batch 26,\tTotal Reward = -147.8,\tFinal Reward = -100.0\n",
            "Batch 27,\tTotal Reward = -210.0,\tFinal Reward = -100.0\n",
            "Batch 28,\tTotal Reward = -239.0,\tFinal Reward = -100.0\n",
            "Batch 29,\tTotal Reward = -200.9,\tFinal Reward = -100.0\n",
            "Batch 30,\tTotal Reward = -261.4,\tFinal Reward = -100.0\n",
            "Batch 31,\tTotal Reward = -202.3,\tFinal Reward = -100.0\n",
            "Batch 32,\tTotal Reward = -218.8,\tFinal Reward = -100.0\n",
            "Batch 33,\tTotal Reward = -191.6,\tFinal Reward = -100.0\n",
            "Batch 34,\tTotal Reward = -189.6,\tFinal Reward = -100.0\n",
            "Batch 35,\tTotal Reward = -178.4,\tFinal Reward = -100.0\n",
            "Batch 36,\tTotal Reward = -287.2,\tFinal Reward = -100.0\n",
            "Batch 37,\tTotal Reward = -204.8,\tFinal Reward = -100.0\n",
            "Batch 38,\tTotal Reward = -122.7,\tFinal Reward = -100.0\n",
            "Batch 39,\tTotal Reward = -216.2,\tFinal Reward = -100.0\n",
            "Batch 40,\tTotal Reward = -178.6,\tFinal Reward = -100.0\n",
            "Batch 41,\tTotal Reward = -135.2,\tFinal Reward = -100.0\n",
            "Batch 42,\tTotal Reward = -192.2,\tFinal Reward = -100.0\n",
            "Batch 43,\tTotal Reward = -88.3,\tFinal Reward = -100.0\n",
            "Batch 44,\tTotal Reward = -188.3,\tFinal Reward = -100.0\n",
            "Batch 45,\tTotal Reward = -139.1,\tFinal Reward = -100.0\n",
            "Batch 46,\tTotal Reward = -160.6,\tFinal Reward = -100.0\n",
            "Batch 47,\tTotal Reward = -221.7,\tFinal Reward = -100.0\n",
            "Batch 48,\tTotal Reward = -156.1,\tFinal Reward = -100.0\n",
            "Batch 49,\tTotal Reward = -114.9,\tFinal Reward = -100.0\n",
            "Batch 50,\tTotal Reward = -281.6,\tFinal Reward = -100.0\n",
            "Batch 51,\tTotal Reward = -256.8,\tFinal Reward = -100.0\n",
            "Batch 52,\tTotal Reward = -183.5,\tFinal Reward = -100.0\n",
            "Batch 53,\tTotal Reward = -161.0,\tFinal Reward = -100.0\n",
            "Batch 54,\tTotal Reward = -131.1,\tFinal Reward = -100.0\n",
            "Batch 55,\tTotal Reward = -171.7,\tFinal Reward = -100.0\n",
            "Batch 56,\tTotal Reward = -185.6,\tFinal Reward = -100.0\n",
            "Batch 57,\tTotal Reward = -243.1,\tFinal Reward = -100.0\n",
            "Batch 58,\tTotal Reward = -195.2,\tFinal Reward = -100.0\n",
            "Batch 59,\tTotal Reward = -109.6,\tFinal Reward = -100.0\n",
            "Batch 60,\tTotal Reward = -191.2,\tFinal Reward = -100.0\n",
            "Batch 61,\tTotal Reward = -210.0,\tFinal Reward = -100.0\n",
            "Batch 62,\tTotal Reward = -158.5,\tFinal Reward = -100.0\n",
            "Batch 63,\tTotal Reward = -112.6,\tFinal Reward = -100.0\n",
            "Batch 64,\tTotal Reward = -171.8,\tFinal Reward = -100.0\n",
            "Batch 65,\tTotal Reward = -179.0,\tFinal Reward = -100.0\n",
            "Batch 66,\tTotal Reward = -245.1,\tFinal Reward = -100.0\n",
            "Batch 67,\tTotal Reward = -259.2,\tFinal Reward = -100.0\n",
            "Batch 68,\tTotal Reward = -175.7,\tFinal Reward = -100.0\n",
            "Batch 69,\tTotal Reward = -245.9,\tFinal Reward = -100.0\n",
            "Batch 70,\tTotal Reward = -104.2,\tFinal Reward = -100.0\n",
            "Batch 71,\tTotal Reward = -157.4,\tFinal Reward = -100.0\n",
            "Batch 72,\tTotal Reward = -123.7,\tFinal Reward = -100.0\n",
            "Batch 73,\tTotal Reward = -191.3,\tFinal Reward = -100.0\n",
            "Batch 74,\tTotal Reward = -193.0,\tFinal Reward = -100.0\n",
            "Batch 75,\tTotal Reward = -151.9,\tFinal Reward = -100.0\n",
            "Batch 76,\tTotal Reward = -169.6,\tFinal Reward = -100.0\n",
            "Batch 77,\tTotal Reward = -185.9,\tFinal Reward = -100.0\n",
            "Batch 78,\tTotal Reward = -160.6,\tFinal Reward = -100.0\n",
            "Batch 79,\tTotal Reward = -198.8,\tFinal Reward = -100.0\n",
            "Batch 80,\tTotal Reward = -227.8,\tFinal Reward = -100.0\n",
            "Batch 81,\tTotal Reward = -142.4,\tFinal Reward = -100.0\n",
            "Batch 82,\tTotal Reward = -175.3,\tFinal Reward = -100.0\n",
            "Batch 83,\tTotal Reward = -241.5,\tFinal Reward = -100.0\n",
            "Batch 84,\tTotal Reward = -124.6,\tFinal Reward = -100.0\n",
            "Batch 85,\tTotal Reward = -133.5,\tFinal Reward = -100.0\n",
            "Batch 86,\tTotal Reward = -177.2,\tFinal Reward = -100.0\n",
            "Batch 87,\tTotal Reward = -166.4,\tFinal Reward = -100.0\n",
            "Batch 88,\tTotal Reward = -168.2,\tFinal Reward = -100.0\n",
            "Batch 89,\tTotal Reward = -134.9,\tFinal Reward = -100.0\n",
            "Batch 90,\tTotal Reward = -148.4,\tFinal Reward = -100.0\n",
            "Batch 91,\tTotal Reward = -148.8,\tFinal Reward = -100.0\n",
            "Batch 92,\tTotal Reward = -129.5,\tFinal Reward = -100.0\n",
            "Batch 93,\tTotal Reward = -157.4,\tFinal Reward = -100.0\n",
            "Batch 94,\tTotal Reward = -143.4,\tFinal Reward = -100.0\n",
            "Batch 95,\tTotal Reward = -152.2,\tFinal Reward = -100.0\n",
            "Batch 96,\tTotal Reward = -222.6,\tFinal Reward = -100.0\n",
            "Batch 97,\tTotal Reward = -146.1,\tFinal Reward = -100.0\n",
            "Batch 98,\tTotal Reward = -184.0,\tFinal Reward = -100.0\n",
            "Batch 99,\tTotal Reward = -150.8,\tFinal Reward = -100.0\n",
            "Batch 100,\tTotal Reward = -114.0,\tFinal Reward = -100.0\n",
            "Batch 101,\tTotal Reward = -143.4,\tFinal Reward = -100.0\n",
            "Batch 102,\tTotal Reward = -168.0,\tFinal Reward = -100.0\n",
            "Batch 103,\tTotal Reward = -153.3,\tFinal Reward = -100.0\n",
            "Batch 104,\tTotal Reward = -138.0,\tFinal Reward = -100.0\n",
            "Batch 105,\tTotal Reward = -120.3,\tFinal Reward = -100.0\n",
            "Batch 106,\tTotal Reward = -159.0,\tFinal Reward = -100.0\n",
            "Batch 107,\tTotal Reward = -170.8,\tFinal Reward = -100.0\n",
            "Batch 108,\tTotal Reward = -105.6,\tFinal Reward = -100.0\n",
            "Batch 109,\tTotal Reward = -168.1,\tFinal Reward = -100.0\n",
            "Batch 110,\tTotal Reward = -120.3,\tFinal Reward = -100.0\n",
            "Batch 111,\tTotal Reward = -176.0,\tFinal Reward = -100.0\n",
            "Batch 112,\tTotal Reward = -248.9,\tFinal Reward = -100.0\n",
            "Batch 113,\tTotal Reward = -174.5,\tFinal Reward = -100.0\n",
            "Batch 114,\tTotal Reward = -152.3,\tFinal Reward = -100.0\n",
            "Batch 115,\tTotal Reward = -182.1,\tFinal Reward = -100.0\n",
            "Batch 116,\tTotal Reward = -215.4,\tFinal Reward = -100.0\n",
            "Batch 117,\tTotal Reward = -215.9,\tFinal Reward = -100.0\n",
            "Batch 118,\tTotal Reward = -152.9,\tFinal Reward = -100.0\n",
            "Batch 119,\tTotal Reward = -108.6,\tFinal Reward = -100.0\n",
            "Batch 120,\tTotal Reward = -123.4,\tFinal Reward = -100.0\n",
            "Batch 121,\tTotal Reward = -166.1,\tFinal Reward = -100.0\n",
            "Batch 122,\tTotal Reward = -179.7,\tFinal Reward = -100.0\n",
            "Batch 123,\tTotal Reward = -126.8,\tFinal Reward = -100.0\n",
            "Batch 124,\tTotal Reward = -122.2,\tFinal Reward = -100.0\n",
            "Batch 125,\tTotal Reward = -145.5,\tFinal Reward = -100.0\n",
            "Batch 126,\tTotal Reward = -114.0,\tFinal Reward = -100.0\n",
            "Batch 127,\tTotal Reward = -185.2,\tFinal Reward = -100.0\n",
            "Batch 128,\tTotal Reward = -130.8,\tFinal Reward = -100.0\n",
            "Batch 129,\tTotal Reward = -169.4,\tFinal Reward = -100.0\n",
            "Batch 130,\tTotal Reward = -95.4,\tFinal Reward = -100.0\n",
            "Batch 131,\tTotal Reward = -151.1,\tFinal Reward = -100.0\n",
            "Batch 132,\tTotal Reward = -133.9,\tFinal Reward = -100.0\n",
            "Batch 133,\tTotal Reward = -110.3,\tFinal Reward = -100.0\n",
            "Batch 134,\tTotal Reward = -160.5,\tFinal Reward = -100.0\n",
            "Batch 135,\tTotal Reward = -181.8,\tFinal Reward = -100.0\n",
            "Batch 136,\tTotal Reward = -159.2,\tFinal Reward = -100.0\n",
            "Batch 137,\tTotal Reward = -122.6,\tFinal Reward = -100.0\n",
            "Batch 138,\tTotal Reward = -175.5,\tFinal Reward = -100.0\n",
            "Batch 139,\tTotal Reward = -211.1,\tFinal Reward = -100.0\n",
            "Batch 140,\tTotal Reward = -109.2,\tFinal Reward = -100.0\n",
            "Batch 141,\tTotal Reward = -156.1,\tFinal Reward = -100.0\n",
            "Batch 142,\tTotal Reward = -118.7,\tFinal Reward = -100.0\n",
            "Batch 143,\tTotal Reward = -197.9,\tFinal Reward = -100.0\n",
            "Batch 144,\tTotal Reward = -145.1,\tFinal Reward = -100.0\n",
            "Batch 145,\tTotal Reward = -115.9,\tFinal Reward = -100.0\n",
            "Batch 146,\tTotal Reward = -103.9,\tFinal Reward = -100.0\n",
            "Batch 147,\tTotal Reward = -148.0,\tFinal Reward = -100.0\n",
            "Batch 148,\tTotal Reward = -174.0,\tFinal Reward = -100.0\n",
            "Batch 149,\tTotal Reward = -110.2,\tFinal Reward = -100.0\n",
            "Batch 150,\tTotal Reward = -165.5,\tFinal Reward = -100.0\n",
            "Batch 151,\tTotal Reward = -120.3,\tFinal Reward = -100.0\n",
            "Batch 152,\tTotal Reward = -175.1,\tFinal Reward = -100.0\n",
            "Batch 153,\tTotal Reward = -136.2,\tFinal Reward = -100.0\n",
            "Batch 154,\tTotal Reward = -117.4,\tFinal Reward = -100.0\n",
            "Batch 155,\tTotal Reward = -84.5,\tFinal Reward = -100.0\n",
            "Batch 156,\tTotal Reward = -186.3,\tFinal Reward = -100.0\n",
            "Batch 157,\tTotal Reward = -144.6,\tFinal Reward = -100.0\n",
            "Batch 158,\tTotal Reward = -202.3,\tFinal Reward = -100.0\n",
            "Batch 159,\tTotal Reward = -170.1,\tFinal Reward = -100.0\n",
            "Batch 160,\tTotal Reward = -124.9,\tFinal Reward = -100.0\n",
            "Batch 161,\tTotal Reward = -100.7,\tFinal Reward = -100.0\n",
            "Batch 162,\tTotal Reward = -175.7,\tFinal Reward = -100.0\n",
            "Batch 163,\tTotal Reward = -183.4,\tFinal Reward = -100.0\n",
            "Batch 164,\tTotal Reward = -136.1,\tFinal Reward = -100.0\n",
            "Batch 165,\tTotal Reward = -135.9,\tFinal Reward = -100.0\n",
            "Batch 166,\tTotal Reward = -124.1,\tFinal Reward = -100.0\n",
            "Batch 167,\tTotal Reward = -171.8,\tFinal Reward = -100.0\n",
            "Batch 168,\tTotal Reward = -202.8,\tFinal Reward = -100.0\n",
            "Batch 169,\tTotal Reward = -117.8,\tFinal Reward = -100.0\n",
            "Batch 170,\tTotal Reward = -121.6,\tFinal Reward = -100.0\n",
            "Batch 171,\tTotal Reward = -115.1,\tFinal Reward = -100.0\n",
            "Batch 172,\tTotal Reward = -182.4,\tFinal Reward = -100.0\n",
            "Batch 173,\tTotal Reward = -148.4,\tFinal Reward = -100.0\n",
            "Batch 174,\tTotal Reward = -118.4,\tFinal Reward = -100.0\n",
            "Batch 175,\tTotal Reward = -141.7,\tFinal Reward = -100.0\n",
            "Batch 176,\tTotal Reward = -102.1,\tFinal Reward = -100.0\n",
            "Batch 177,\tTotal Reward = -154.0,\tFinal Reward = -100.0\n",
            "Batch 178,\tTotal Reward = -152.5,\tFinal Reward = -100.0\n",
            "Batch 179,\tTotal Reward = -150.4,\tFinal Reward = -100.0\n",
            "Batch 180,\tTotal Reward = -160.5,\tFinal Reward = -100.0\n",
            "Batch 181,\tTotal Reward = -146.6,\tFinal Reward = -100.0\n",
            "Batch 182,\tTotal Reward = -171.6,\tFinal Reward = -100.0\n",
            "Batch 183,\tTotal Reward = -156.8,\tFinal Reward = -100.0\n",
            "Batch 184,\tTotal Reward = -111.7,\tFinal Reward = -100.0\n",
            "Batch 185,\tTotal Reward = -128.3,\tFinal Reward = -100.0\n",
            "Batch 186,\tTotal Reward = -130.2,\tFinal Reward = -100.0\n",
            "Batch 187,\tTotal Reward = -157.3,\tFinal Reward = -100.0\n",
            "Batch 188,\tTotal Reward = -129.2,\tFinal Reward = -100.0\n",
            "Batch 189,\tTotal Reward = -125.0,\tFinal Reward = -100.0\n",
            "Batch 190,\tTotal Reward = -105.5,\tFinal Reward = -100.0\n",
            "Batch 191,\tTotal Reward = -159.5,\tFinal Reward = -100.0\n",
            "Batch 192,\tTotal Reward = -171.1,\tFinal Reward = -100.0\n",
            "Batch 193,\tTotal Reward = -141.5,\tFinal Reward = -100.0\n",
            "Batch 194,\tTotal Reward = -184.1,\tFinal Reward = -100.0\n",
            "Batch 195,\tTotal Reward = -170.7,\tFinal Reward = -100.0\n",
            "Batch 196,\tTotal Reward = -143.3,\tFinal Reward = -100.0\n",
            "Batch 197,\tTotal Reward = -125.3,\tFinal Reward = -100.0\n",
            "Batch 198,\tTotal Reward = -110.3,\tFinal Reward = -100.0\n",
            "Batch 199,\tTotal Reward = -110.9,\tFinal Reward = -100.0\n",
            "Batch 200,\tTotal Reward = -110.5,\tFinal Reward = -100.0\n",
            "Batch 201,\tTotal Reward = -103.3,\tFinal Reward = -100.0\n",
            "Batch 202,\tTotal Reward = -131.1,\tFinal Reward = -100.0\n",
            "Batch 203,\tTotal Reward = -144.6,\tFinal Reward = -100.0\n",
            "Batch 204,\tTotal Reward = -195.1,\tFinal Reward = -100.0\n",
            "Batch 205,\tTotal Reward = -130.5,\tFinal Reward = -100.0\n",
            "Batch 206,\tTotal Reward = -130.7,\tFinal Reward = -100.0\n",
            "Batch 207,\tTotal Reward = -127.7,\tFinal Reward = -100.0\n",
            "Batch 208,\tTotal Reward = -124.4,\tFinal Reward = -100.0\n",
            "Batch 209,\tTotal Reward = -95.8,\tFinal Reward = -100.0\n",
            "Batch 210,\tTotal Reward = -138.3,\tFinal Reward = -100.0\n",
            "Batch 211,\tTotal Reward = -128.8,\tFinal Reward = -100.0\n",
            "Batch 212,\tTotal Reward = -120.1,\tFinal Reward = -100.0\n",
            "Batch 213,\tTotal Reward = -96.4,\tFinal Reward = -100.0\n",
            "Batch 214,\tTotal Reward = -114.8,\tFinal Reward = -100.0\n",
            "Batch 215,\tTotal Reward = -151.4,\tFinal Reward = -100.0\n",
            "Batch 216,\tTotal Reward = -110.7,\tFinal Reward = -100.0\n",
            "Batch 217,\tTotal Reward = -123.5,\tFinal Reward = -100.0\n",
            "Batch 218,\tTotal Reward = -108.5,\tFinal Reward = -100.0\n",
            "Batch 219,\tTotal Reward = -90.9,\tFinal Reward = -100.0\n",
            "Batch 220,\tTotal Reward = -155.3,\tFinal Reward = -100.0\n",
            "Batch 221,\tTotal Reward = -107.0,\tFinal Reward = -100.0\n",
            "Batch 222,\tTotal Reward = -102.8,\tFinal Reward = -100.0\n",
            "Batch 223,\tTotal Reward = -119.0,\tFinal Reward = -100.0\n",
            "Batch 224,\tTotal Reward = -113.7,\tFinal Reward = -100.0\n",
            "Batch 225,\tTotal Reward = -182.6,\tFinal Reward = -100.0\n",
            "Batch 226,\tTotal Reward = -173.6,\tFinal Reward = -100.0\n",
            "Batch 227,\tTotal Reward = -166.5,\tFinal Reward = -100.0\n",
            "Batch 228,\tTotal Reward = -110.9,\tFinal Reward = -100.0\n",
            "Batch 229,\tTotal Reward = -103.9,\tFinal Reward = -100.0\n",
            "Batch 230,\tTotal Reward = -128.9,\tFinal Reward = -100.0\n",
            "Batch 231,\tTotal Reward = -97.9,\tFinal Reward = -100.0\n",
            "Batch 232,\tTotal Reward = -122.3,\tFinal Reward = -100.0\n",
            "Batch 233,\tTotal Reward = -93.5,\tFinal Reward = -100.0\n",
            "Batch 234,\tTotal Reward = -127.6,\tFinal Reward = -100.0\n",
            "Batch 235,\tTotal Reward = -130.5,\tFinal Reward = -100.0\n",
            "Batch 236,\tTotal Reward = -121.7,\tFinal Reward = -100.0\n",
            "Batch 237,\tTotal Reward = -94.6,\tFinal Reward = -100.0\n",
            "Batch 238,\tTotal Reward = -109.2,\tFinal Reward = -100.0\n",
            "Batch 239,\tTotal Reward = -96.6,\tFinal Reward = -100.0\n",
            "Batch 240,\tTotal Reward = -149.1,\tFinal Reward = -100.0\n",
            "Batch 241,\tTotal Reward = -132.3,\tFinal Reward = -100.0\n",
            "Batch 242,\tTotal Reward = -104.5,\tFinal Reward = -100.0\n",
            "Batch 243,\tTotal Reward = -152.5,\tFinal Reward = -100.0\n",
            "Batch 244,\tTotal Reward = -128.8,\tFinal Reward = -100.0\n",
            "Batch 245,\tTotal Reward = -110.3,\tFinal Reward = -100.0\n",
            "Batch 246,\tTotal Reward = -95.2,\tFinal Reward = -100.0\n",
            "Batch 247,\tTotal Reward = -146.5,\tFinal Reward = -100.0\n",
            "Batch 248,\tTotal Reward = -117.2,\tFinal Reward = -100.0\n",
            "Batch 249,\tTotal Reward = -104.5,\tFinal Reward = -100.0\n",
            "Batch 250,\tTotal Reward = -96.0,\tFinal Reward = -100.0\n",
            "Batch 251,\tTotal Reward = -78.5,\tFinal Reward = -100.0\n",
            "Batch 252,\tTotal Reward = -125.5,\tFinal Reward = -100.0\n",
            "Batch 253,\tTotal Reward = -132.7,\tFinal Reward = -100.0\n",
            "Batch 254,\tTotal Reward = -101.5,\tFinal Reward = -100.0\n",
            "Batch 255,\tTotal Reward = -139.4,\tFinal Reward = -100.0\n",
            "Batch 256,\tTotal Reward = -106.9,\tFinal Reward = -100.0\n",
            "Batch 257,\tTotal Reward = -182.4,\tFinal Reward = -100.0\n",
            "Batch 258,\tTotal Reward = -115.3,\tFinal Reward = -100.0\n",
            "Batch 259,\tTotal Reward = -142.7,\tFinal Reward = -100.0\n",
            "Batch 260,\tTotal Reward = -188.1,\tFinal Reward = -100.0\n",
            "Batch 261,\tTotal Reward = -108.0,\tFinal Reward = -100.0\n",
            "Batch 262,\tTotal Reward = -150.4,\tFinal Reward = -100.0\n",
            "Batch 263,\tTotal Reward = -113.6,\tFinal Reward = -100.0\n",
            "Batch 264,\tTotal Reward = -127.7,\tFinal Reward = -100.0\n",
            "Batch 265,\tTotal Reward = -135.2,\tFinal Reward = -100.0\n",
            "Batch 266,\tTotal Reward = -102.1,\tFinal Reward = -100.0\n",
            "Batch 267,\tTotal Reward = -127.7,\tFinal Reward = -100.0\n",
            "Batch 268,\tTotal Reward = -171.2,\tFinal Reward = -100.0\n",
            "Batch 269,\tTotal Reward = -174.8,\tFinal Reward = -100.0\n",
            "Batch 270,\tTotal Reward = -112.3,\tFinal Reward = -100.0\n",
            "Batch 271,\tTotal Reward = -81.9,\tFinal Reward = -100.0\n",
            "Batch 272,\tTotal Reward = -156.7,\tFinal Reward = -100.0\n",
            "Batch 273,\tTotal Reward = -107.0,\tFinal Reward = -100.0\n",
            "Batch 274,\tTotal Reward = -76.8,\tFinal Reward = -100.0\n",
            "Batch 275,\tTotal Reward = -101.4,\tFinal Reward = -100.0\n",
            "Batch 276,\tTotal Reward = -118.2,\tFinal Reward = -100.0\n",
            "Batch 277,\tTotal Reward = -156.1,\tFinal Reward = -100.0\n",
            "Batch 278,\tTotal Reward = -117.8,\tFinal Reward = -100.0\n",
            "Batch 279,\tTotal Reward = -112.7,\tFinal Reward = -100.0\n",
            "Batch 280,\tTotal Reward = -134.4,\tFinal Reward = -100.0\n",
            "Batch 281,\tTotal Reward = -168.6,\tFinal Reward = -100.0\n",
            "Batch 282,\tTotal Reward = -145.7,\tFinal Reward = -100.0\n",
            "Batch 283,\tTotal Reward = -121.1,\tFinal Reward = -100.0\n",
            "Batch 284,\tTotal Reward = -113.2,\tFinal Reward = -100.0\n",
            "Batch 285,\tTotal Reward = -145.0,\tFinal Reward = -100.0\n",
            "Batch 286,\tTotal Reward = -150.2,\tFinal Reward = -100.0\n",
            "Batch 287,\tTotal Reward = -154.5,\tFinal Reward = -100.0\n",
            "Batch 288,\tTotal Reward = -164.4,\tFinal Reward = -100.0\n",
            "Batch 289,\tTotal Reward = -85.7,\tFinal Reward = -100.0\n",
            "Batch 290,\tTotal Reward = -93.0,\tFinal Reward = -100.0\n",
            "Batch 291,\tTotal Reward = -100.8,\tFinal Reward = -100.0\n",
            "Batch 292,\tTotal Reward = -100.3,\tFinal Reward = -100.0\n",
            "Batch 293,\tTotal Reward = -138.9,\tFinal Reward = -100.0\n",
            "Batch 294,\tTotal Reward = -96.5,\tFinal Reward = -100.0\n",
            "Batch 295,\tTotal Reward = -105.0,\tFinal Reward = -100.0\n",
            "Batch 296,\tTotal Reward = -98.7,\tFinal Reward = -100.0\n",
            "Batch 297,\tTotal Reward = -127.7,\tFinal Reward = -100.0\n",
            "Batch 298,\tTotal Reward = -110.6,\tFinal Reward = -100.0\n",
            "Batch 299,\tTotal Reward = -123.8,\tFinal Reward = -100.0\n",
            "Batch 300,\tTotal Reward = -137.9,\tFinal Reward = -100.0\n",
            "Batch 301,\tTotal Reward = -139.7,\tFinal Reward = -100.0\n",
            "Batch 302,\tTotal Reward = -110.1,\tFinal Reward = -100.0\n",
            "Batch 303,\tTotal Reward = -97.6,\tFinal Reward = -100.0\n",
            "Batch 304,\tTotal Reward = -149.9,\tFinal Reward = -100.0\n",
            "Batch 305,\tTotal Reward = -114.2,\tFinal Reward = -100.0\n",
            "Batch 306,\tTotal Reward = -64.1,\tFinal Reward = -100.0\n",
            "Batch 307,\tTotal Reward = -105.0,\tFinal Reward = -100.0\n",
            "Batch 308,\tTotal Reward = -180.7,\tFinal Reward = -100.0\n",
            "Batch 309,\tTotal Reward = -130.7,\tFinal Reward = -100.0\n",
            "Batch 310,\tTotal Reward = -159.2,\tFinal Reward = -100.0\n",
            "Batch 311,\tTotal Reward = -110.1,\tFinal Reward = -100.0\n",
            "Batch 312,\tTotal Reward = -110.6,\tFinal Reward = -100.0\n",
            "Batch 313,\tTotal Reward = -141.9,\tFinal Reward = -100.0\n",
            "Batch 314,\tTotal Reward = -146.5,\tFinal Reward = -100.0\n",
            "Batch 315,\tTotal Reward = -91.3,\tFinal Reward = -100.0\n",
            "Batch 316,\tTotal Reward = -180.3,\tFinal Reward = -100.0\n",
            "Batch 317,\tTotal Reward = -108.7,\tFinal Reward = -100.0\n",
            "Batch 318,\tTotal Reward = -133.8,\tFinal Reward = -100.0\n",
            "Batch 319,\tTotal Reward = -129.7,\tFinal Reward = -100.0\n",
            "Batch 320,\tTotal Reward = -122.9,\tFinal Reward = -100.0\n",
            "Batch 321,\tTotal Reward = -111.6,\tFinal Reward = -100.0\n",
            "Batch 322,\tTotal Reward = -124.3,\tFinal Reward = -100.0\n",
            "Batch 323,\tTotal Reward = -97.8,\tFinal Reward = -100.0\n",
            "Batch 324,\tTotal Reward = -124.2,\tFinal Reward = -100.0\n",
            "Batch 325,\tTotal Reward = -128.1,\tFinal Reward = -100.0\n",
            "Batch 326,\tTotal Reward = -97.9,\tFinal Reward = -100.0\n",
            "Batch 327,\tTotal Reward = -129.6,\tFinal Reward = -100.0\n",
            "Batch 328,\tTotal Reward = -151.0,\tFinal Reward = -100.0\n",
            "Batch 329,\tTotal Reward = -108.1,\tFinal Reward = -100.0\n",
            "Batch 330,\tTotal Reward = -84.5,\tFinal Reward = -100.0\n",
            "Batch 331,\tTotal Reward = -111.1,\tFinal Reward = -100.0\n",
            "Batch 332,\tTotal Reward = -121.2,\tFinal Reward = -100.0\n",
            "Batch 333,\tTotal Reward = -110.6,\tFinal Reward = -100.0\n",
            "Batch 334,\tTotal Reward = -110.9,\tFinal Reward = -100.0\n",
            "Batch 335,\tTotal Reward = -127.0,\tFinal Reward = -100.0\n",
            "Batch 336,\tTotal Reward = -79.1,\tFinal Reward = -100.0\n",
            "Batch 337,\tTotal Reward = -114.4,\tFinal Reward = -100.0\n",
            "Batch 338,\tTotal Reward = -103.8,\tFinal Reward = -100.0\n",
            "Batch 339,\tTotal Reward = -104.1,\tFinal Reward = -100.0\n",
            "Batch 340,\tTotal Reward = -112.8,\tFinal Reward = -100.0\n",
            "Batch 341,\tTotal Reward = -100.8,\tFinal Reward = -100.0\n",
            "Batch 342,\tTotal Reward = -81.4,\tFinal Reward = -100.0\n",
            "Batch 343,\tTotal Reward = -124.8,\tFinal Reward = -100.0\n",
            "Batch 344,\tTotal Reward = -108.9,\tFinal Reward = -100.0\n",
            "Batch 345,\tTotal Reward = -105.8,\tFinal Reward = -100.0\n",
            "Batch 346,\tTotal Reward = -106.5,\tFinal Reward = -100.0\n",
            "Batch 347,\tTotal Reward = -112.4,\tFinal Reward = -100.0\n",
            "Batch 348,\tTotal Reward = -125.1,\tFinal Reward = -100.0\n",
            "Batch 349,\tTotal Reward = -95.9,\tFinal Reward = -100.0\n",
            "Batch 350,\tTotal Reward = -89.7,\tFinal Reward = -100.0\n",
            "Batch 351,\tTotal Reward = -97.5,\tFinal Reward = -100.0\n",
            "Batch 352,\tTotal Reward = -114.2,\tFinal Reward = -100.0\n",
            "Batch 353,\tTotal Reward = -129.7,\tFinal Reward = -100.0\n",
            "Batch 354,\tTotal Reward = -103.3,\tFinal Reward = -100.0\n",
            "Batch 355,\tTotal Reward = -117.6,\tFinal Reward = -100.0\n",
            "Batch 356,\tTotal Reward = -126.2,\tFinal Reward = -100.0\n",
            "Batch 357,\tTotal Reward = -125.6,\tFinal Reward = -100.0\n",
            "Batch 358,\tTotal Reward = -86.3,\tFinal Reward = -100.0\n",
            "Batch 359,\tTotal Reward = -91.2,\tFinal Reward = -100.0\n",
            "Batch 360,\tTotal Reward = -77.5,\tFinal Reward = -100.0\n",
            "Batch 361,\tTotal Reward = -108.3,\tFinal Reward = -100.0\n",
            "Batch 362,\tTotal Reward = -147.5,\tFinal Reward = -100.0\n",
            "Batch 363,\tTotal Reward = -108.7,\tFinal Reward = -100.0\n",
            "Batch 364,\tTotal Reward = -110.0,\tFinal Reward = -100.0\n",
            "Batch 365,\tTotal Reward = -133.0,\tFinal Reward = -100.0\n",
            "Batch 366,\tTotal Reward = -64.1,\tFinal Reward = -100.0\n",
            "Batch 367,\tTotal Reward = -135.9,\tFinal Reward = -100.0\n",
            "Batch 368,\tTotal Reward = -120.9,\tFinal Reward = -100.0\n",
            "Batch 369,\tTotal Reward = -104.7,\tFinal Reward = -100.0\n",
            "Batch 370,\tTotal Reward = -155.9,\tFinal Reward = -100.0\n",
            "Batch 371,\tTotal Reward = -122.9,\tFinal Reward = -100.0\n",
            "Batch 372,\tTotal Reward = -116.6,\tFinal Reward = -100.0\n",
            "Batch 373,\tTotal Reward = -100.7,\tFinal Reward = -100.0\n",
            "Batch 374,\tTotal Reward = -131.9,\tFinal Reward = -100.0\n",
            "Batch 375,\tTotal Reward = -96.5,\tFinal Reward = -100.0\n",
            "Batch 376,\tTotal Reward = -70.6,\tFinal Reward = -100.0\n",
            "Batch 377,\tTotal Reward = -163.0,\tFinal Reward = -100.0\n",
            "Batch 378,\tTotal Reward = -115.1,\tFinal Reward = -100.0\n",
            "Batch 379,\tTotal Reward = -137.8,\tFinal Reward = -100.0\n",
            "Batch 380,\tTotal Reward = -93.5,\tFinal Reward = -100.0\n",
            "Batch 381,\tTotal Reward = -79.1,\tFinal Reward = -100.0\n",
            "Batch 382,\tTotal Reward = -80.8,\tFinal Reward = -100.0\n",
            "Batch 383,\tTotal Reward = -105.6,\tFinal Reward = -100.0\n",
            "Batch 384,\tTotal Reward = -117.4,\tFinal Reward = -100.0\n",
            "Batch 385,\tTotal Reward = -139.5,\tFinal Reward = -100.0\n",
            "Batch 386,\tTotal Reward = -87.3,\tFinal Reward = -100.0\n",
            "Batch 387,\tTotal Reward = -95.8,\tFinal Reward = -100.0\n",
            "Batch 388,\tTotal Reward = -121.0,\tFinal Reward = -100.0\n",
            "Batch 389,\tTotal Reward = -110.1,\tFinal Reward = -100.0\n",
            "Batch 390,\tTotal Reward = -128.2,\tFinal Reward = -79.6\n",
            "Batch 391,\tTotal Reward = -96.8,\tFinal Reward = -100.0\n",
            "Batch 392,\tTotal Reward = -93.1,\tFinal Reward = -100.0\n",
            "Batch 393,\tTotal Reward = -118.6,\tFinal Reward = -100.0\n",
            "Batch 394,\tTotal Reward = -121.0,\tFinal Reward = -100.0\n",
            "Batch 395,\tTotal Reward = -79.9,\tFinal Reward = -100.0\n",
            "Batch 396,\tTotal Reward = -132.6,\tFinal Reward = -100.0\n",
            "Batch 397,\tTotal Reward = -126.3,\tFinal Reward = -100.0\n",
            "Batch 398,\tTotal Reward = -97.3,\tFinal Reward = -100.0\n",
            "Batch 399,\tTotal Reward = -105.9,\tFinal Reward = -100.0\n",
            "Batch 400,\tTotal Reward = -88.1,\tFinal Reward = -100.0\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "vNb_tuFYhKVK",
        "colab_type": "text"
      },
      "source": [
        "### 訓練結果\n",
        "\n",
        "訓練過程中，我們持續記下了 `avg_total_reward`，這個數值代表的是：每次更新 policy network 前，我們讓 agent 玩數個回合（episodes），而這些回合的平均 total rewards 為何。\n",
        "理論上，若是 agent 一直在進步，則所得到的 `avg_total_reward` 也會持續上升，直至 250 上下。\n",
        "若將其畫出來則結果如下："
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "wZYOI8H10SHN",
        "colab_type": "code",
        "outputId": "1f1cae34-df0c-4bd5-9d89-c5ed57f4a603",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 281
        }
      },
      "source": [
        "plt.plot(avg_total_rewards)\n",
        "plt.title(\"Total Rewards\")\n",
        "plt.show()"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEICAYAAAC3Y/QeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nOx9d7gdVbn++83scmr6CYH0QAISOqEp\nTUSIIqLeq2LvyhXsXn+oV0W5lisqFiwXu1cQUURQUHqXAIEEElpIAgkppJwkJzltl5n1+2Pmm1mz\nZs3es885+7S93ufJk7NnZs+sPXvPu771fo2EEDAwMDAwaCxYIz0AAwMDA4PhhyF/AwMDgwaEIX8D\nAwODBoQhfwMDA4MGhCF/AwMDgwaEIX8DAwODBoQhf4OGBxE1EZEgolkjPZbBgIi+RUS/GOlxGIwN\nGPI3GJUgom7pn0tEfdLrd1R571IiWjuEY1lGRP3+tXcQ0bVE1DFU5zcwGAkY8jcYlRBCtPE/ABsB\nnCttu2oEhvRBfywHA5gO4FsjMAYAABFZRGSeXYNBwfyADMYkiKiZiH5MRFuJaBMRXUZEWSKaCuB6\nAAuklcJUInoFET1ERHuIaAsRXU5EmVqvK4TYBeBGAEdJY7GJ6EtEtJ6IdhLRVUQ0yd/3RyK60P/7\nQF9e+oD/ejERveT/3UFE//BXFruI6AYi2l+6xjIi+hoRPQSgF8ABRHQQET1ARPuI6B8AJkvHtxL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kfE4oi4jKJP7YqIG+l2vWbz3epeu1G8W/8kxXzjlhpzLKO4\nyuIAcGgiC8U83R+Ap4AHgXkV5fkZxXTAfynmEj/aLgvFlQ7fzho+BqyuONeP87gH80G/sLT/lsx1\nGFjbxVzXUkzpHAT2521d3TWbIletNQPeDDyaxx8FPld6HuyleKP5F8BQjp+X62O5fVnFuXZlvUaB\nn3D6iqDKHvuljO/g9NU+Xa2X/7yDmVkD9fO0j5mZteHmb2bWQG7+ZmYN5OZvZtZAbv5mZg3k5m9m\n1kBu/mZmDfR/eLSd+Qi+jrwAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "mV5jj4dThz0Y",
        "colab_type": "text"
      },
      "source": [
        "另外，`avg_final_reward` 代表的是多個回合的平均 final rewards，而 final reward 即是 agent 在單一回合中拿到的最後一個 reward。\n",
        "如果同學們還記得環境給予登月小艇 reward 的方式，便會知道，不論**回合的最後**小艇是不幸墜毀、飛出畫面、或是靜止在地面上，都會受到額外地獎勵或處罰。\n",
        "也因此，final reward 可被用來觀察 agent 的「著地」是否順利等資訊。"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "txDZ5vlGWz5w",
        "colab_type": "code",
        "outputId": "ffbecb9d-e408-4cbc-8bed-4c1bddffc8c9",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 281
        }
      },
      "source": [
        "plt.plot(avg_final_rewards)\n",
        "plt.title(\"Final Rewards\")\n",
        "plt.show()"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEICAYAAABF82P+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0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NDigAAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "u2HaGRVEYGQS",
        "colab_type": "text"
      },
      "source": [
        "## 測試"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "5yFuUKKRYH73",
        "colab_type": "code",
        "outputId": "b18389e2-83e2-430a-90cb-8c34f3f93014",
        "colab": {
          "base_uri": "https://localhost:8080/"
        }
      },
      "source": [
        "agent.network.eval()  # 測試前先將 network 切換為 evaluation 模式\n",
        "\n",
        "state = env.reset()\n",
        "\n",
        "img = plt.imshow(env.render(mode='rgb_array'))\n",
        "\n",
        "total_reward = 0\n",
        "\n",
        "done = False\n",
        "while not done:\n",
        "    action, _ = agent.sample(state)\n",
        "    state, reward, done, _ = env.step(action)\n",
        "\n",
        "    total_reward += reward\n",
        "\n",
        "    img.set_data(env.render(mode='rgb_array'))\n",
        "    display.display(plt.gcf())\n",
        "    display.clear_output(wait=True)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAATBklEQVR4nO3df6zdd33f8eerSQisoCYBN3JsZ4Hh\nDkXV5uC7EFQ0hUjQEJk5lRgNm4rF0C6TggRatC3ppOFq6x+VCmyIKpurZDgVS5rxY3GtVRBCJtY/\nSLAhhPwgxZSg2DUxbUggQkvn8N4f53Ozw/W177k/js/9nPN8SEfn+/18v99zPh/fk5c/ed/P1ydV\nhSSpH78w6Q5IklbG4JakzhjcktQZg1uSOmNwS1JnDG5J6szYgjvJtUm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JRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Aex7mcKr0J01",
        "colab_type": "code",
        "outputId": "0ffbf013-226f-40f0-faae-735f48493ed3",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "print(total_reward)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "-86.50240373839777\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "wUBtYXG2eaqf",
        "colab_type": "text"
      },
      "source": [
        "## 參考資料\n",
        "\n",
        "以下是一些有用的參考資料。\n",
        "建議同學們實做前，可以先參考第一則連結的上課影片。\n",
        "在影片的最後有提到兩個有用的 Tips，這對於本次作業的實做非常有幫助。\n",
        "\n",
        "- [DRL Lecture 1: Policy Gradient (Review)](https://youtu.be/z95ZYgPgXOY)\n",
        "- [ML Lecture 23-3: Reinforcement Learning (including Q-learning) start at 30:00](https://youtu.be/2-JNBzCq77c?t=1800)\n",
        "- [Lecture 7: Policy Gradient, David Silver](http://www0.cs.ucl.ac.uk/staff/d.silver/web/Teaching_files/pg.pdf)\n"
      ]
    }
  ]
}